package com.bwie.controller;

import com.bwie.pojo.TbOrder;
import com.bwie.pojo.TbReceive;
import com.bwie.pojo.TbShipments;
import com.bwie.service.OrderInfoService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Title:
 * @BelongProjecet practice2
 * @BelongPackage com.bwie.controller
 * @Description:
 * @Copyright 研发一部
 * @Author: Mr.yan
 * @Date: 2024/6/7 15:10
 * @Version V1.0
 */
@RestController
@RequestMapping(value = "/info/info")
public class OrderInfoController {
    @Autowired
    private OrderInfoService orderInfoService;

    /**
     * @Description: //TODO
     * @Auther: yanxingru
     * @Date: 2024/6/7 15:15
     * @param: t添加发货方详情
     * @param tbOrder
     * @return com.bwie.utils.R
     */
    @PostMapping("/addShipments")
    public R addShipments(
            @RequestBody TbOrder tbOrder
            ){
        return orderInfoService.addShipments(tbOrder);
    }

    /**
     * @Description: //TODO
     * @Auther: yanxingru
     * @Date: 2024/6/7 15:17
     * @param: 添加收货人详情
     * @param tbOrder
     * @return com.bwie.utils.R
     */
    @PostMapping("/addReceive")
    public R addReceive(
            @RequestBody TbOrder tbOrder
            ){
        return orderInfoService.addReceive(tbOrder);
    }
    /**
     * @Description: //TODO
     * @Auther: yanxingru
     * @Date: 2024/6/11 10:06
     * @param: 支付状态下拉框
     * @return com.bwie.utils.R
     */
    @PostMapping("/selectPay")
    public R selectPay(){
        return orderInfoService.selectPay();
    }

    /**
     * @Description: //TODO
     * @Auther: yanxingru
     * @Date: 2024/6/11 10:06
     * @param: 支付状态下拉框
     * @return com.bwie.utils.R
     */
    @PostMapping("/selectStatus")
    public R selectStatus(){
        return orderInfoService.selectStatus();
    }

    /**
     * @Description: //TODO
     * @Auther: yanxingru
     * @Date: 2024/6/11 11:39
     * @param: 商品类型
     * @return com.bwie.utils.R
     */
    @PostMapping("/goodsTypeList")
    public R goodsTypeList(){
        return orderInfoService.goodsTypeList();
    }
}
